home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / qlib205.zip / QLIB.ZIP / TXT / CALLBACK.TXT next >
Text File  |  1997-03-14  |  1KB  |  38 lines

  1.      CALL BACKs
  2.      ----------
  3.  
  4. QLIB provides these servies for using callbacks:
  5.  
  6. alloc_callback(dword your_proc,dword call_back_struct,byte typ);
  7.   - this is used to alloc the callback
  8.   - your_proc should be the offset of your proc to call
  9.   - call_back_struct must be the offset of a callstruct<> that you must
  10.     have in your data segment (although DOS32 does not require this, DOS/4GW
  11.     and PMODE/W do so you must use one at all times)
  12.   - typ is the type of callback you wish to get:
  13.     CB_RETF = retf stack frame 
  14.     CB_IRET = iret stack frame
  15.   - ax:dx is returned which is the (CS:IP) of the real mode callback
  16.  
  17. _iret(dword call_back_struct);
  18.   - this must be called at the end of your proc if you are using a
  19.     iret stack frame
  20.   - this function does not return (it ends your proc and passes control
  21.     back to real mode)
  22.  
  23. _retf(dword call_back_struct);
  24.   - this must be called at the end of your proc if you are using a
  25.     retf stack frame
  26.   - this function does not return (it ends your proc and passes control
  27.     back to real mode)
  28.  
  29. free_callback(_seg:word,_off:word)
  30.   - this frees a callback (_seg and _off are values you received from
  31.     alloc_callback() )
  32.  
  33. If you use the above then your code will always work.  If you know you are
  34. using a specfic DOS extender and will to use it's function directly you may,
  35. but make sure to indicate this in your source code if you plan on releasing
  36. the source.
  37.  
  38.